import { defineComponent, openBlock, createElementBlock, createVNode, createElementVNode, mergeProps, unref, toHandlers, withCtx, createTextVNode } from "vue";
import UploadIcon from "../../icons/upload-icon.vue.mjs";
import { Button } from "ant-design-vue";
import "../../upload-file/upload-file.vue.mjs";
import { omit } from "lodash-es";
import _sfc_main$1 from "../../upload-file/upload-file.vue2.mjs";
const _hoisted_1 = { class: "me-sender-upload" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "upload",
  props: {
    uploadProps: { default() {
      return {
        url: "/",
        fieldName: "filedata",
        afterUpload() {
          return true;
        },
        beforeUpload() {
          return true;
        }
      };
    } },
    uploadEvents: { default() {
      return {};
    } }
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(UploadIcon, { class: "me-sender-upload-icon" }),
        _cache[2] || (_cache[2] = createElementVNode("div", null, "支持 pdf, doc, xlsx, ppt, txt, image类型", -1)),
        createVNode(_sfc_main$1, mergeProps({
          "file-list": _ctx.uploadProps.fileList,
          "onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => _ctx.uploadProps.fileList = $event)
        }, unref(omit)(_ctx.uploadProps, ["fileList"]), toHandlers(_ctx.uploadEvents)), {
          default: withCtx(() => [
            createVNode(unref(Button), { class: "me-sender-upload-btn" }, {
              default: withCtx(() => _cache[1] || (_cache[1] = [
                createTextVNode("上传文件")
              ])),
              _: 1
            })
          ]),
          _: 1
        }, 16, ["file-list"])
      ]);
    };
  }
});
export {
  _sfc_main as default
};
//# sourceMappingURL=upload.vue2.mjs.map
